package com.example.f8399.testdemo.daoEntity;

import io.objectbox.annotation.Entity;
import io.objectbox.annotation.Id;
import io.objectbox.annotation.NameInDb;
import io.objectbox.annotation.Transient;

/**
 * Created by f8399 on 2018/7/28.
 */
@Entity
public class ExampleEntity {
    @Id
    private long id; // objectbox强烈要求ids 使用long类型的，如果时String类型的话，需要其他处理,还有就是这个id是自己生成的，不需要你去赋值
    @NameInDb("USERNAME")
    private String name;
    @Transient
    private int tempUsageCount;//临时数据

    public ExampleEntity() {
    }

    public ExampleEntity(long id, String name) {
        this.id = id;
        this.name = name;
    }

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getTempUsageCount() {
        return tempUsageCount;
    }

    public void setTempUsageCount(int tempUsageCount) {
        this.tempUsageCount = tempUsageCount;
    }

}
